from mpi4py import MPI


comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
if rank == 0:
    data_send = list(range(10))
    comm.send(data_send, dest=1)
    print(f'Process {rank} send {data_send}...')
else:
    data_recv = comm.recv(source=0)
    print(f'Process {rank} recv {data_recv}...')
